The ‘else without if’ error is quite self-explanatory – it occurs when the ‘else’ keyword is used without an …
To fix the code, we removed the semi-colon (;) from the end of the if statement and placed the {} for each block to fix …
更多内容请点击:How to Fix the Error: Else Without if in Java - Delft Stack